<div id="network-supply-reliability-bar5" style="height: 100%">

</div>

<script type="text/javascript">
    function loadbar5(ds,types) {
        $.ajax({
            url: "#springUrl('/network/supply/response/getDataMap')",
            data: {"batchId": "$!{batchId}"},
            type: "POST",
            success: function (text) {
                var d = JSON.parse(text);
                if (d.success && d.data) {

                    var myChart = echarts.init(document.getElementById('network-supply-reliability-bar5'), types);
                    var planePath = 'path://M1705.06,1318.313v-89.254l-319.9-221.799l0.073-208.063c0.521-84.662-26.629-121.796-63.961-121.491c-37.332-0.305-64.482,36.829-63.961,121.491l0.073,208.063l-319.9,221.799v89.254l330.343-157.288l12.238,241.308l-134.449,92.931l0.531,42.034l175.125-42.917l175.125,42.917l0.531-42.034l-134.449-92.931l12.238-241.308L1705.06,1318.313z';
                    var color = ['#a6c84c', '#ffa022', '#46bee9', '#D1E9B1', '#7DFF21'];
                    var series = [];
                    var legend = [];
                    d.data.forEach(function (item, i) {
                        legend.push(item.name);
                        series.push({
                            name: "",
                            type: 'effectScatter',
                            coordinateSystem: 'geo',
                            zlevel: 2,
                            rippleEffect: {
                                brushType: 'stroke'
                            },
                            label: {
                                normal: {
                                    show: false,
                                    position: 'right',
                                    formatter: '{b}'
                                }
                            },
                            symbolSize: function (val) {
                                return val[2] / 8;
                            },
                            itemStyle: {
                                normal: {
                                    color: color[i]
                                }
                            },
                            data:item.nodes
                        });
                    });


                    option = {
             //           backgroundColor: '#ffffff',
                        title: {
                            text: '订单分布情况',
                            left: 'center',
                            textStyle: {
                  //              color: '#fff'
                            },show:false
                        },
                        tooltip: {
                            trigger: 'item'
                        }, toolbox: {
                            left: 'left',
                            feature: {
                                restore: {},
                                saveAsImage: {}
                            }
                        },
                        legend: {
                            orient: 'vertical',
                            top: 'bottom',
                            left: 'right',
                            data: legend,
                            textStyle: {
                   //             color: '#fff'
                            }
                        },
                        geo: {
                            map: 'china',
                            label: {
                                emphasis: {
                                    show: false
                                }
                            },
                            roam: true,
                            itemStyle: {
                                normal: {
                             //       areaColor: '#323c48',
                              //      borderColor: '#404a59'
                                },
                                emphasis: {
                             //       areaColor: '#2a333d'
                                }
                            }
                        },
                        series: series
                    };
                    myChart.setOption(option);
                }else{
                    toastr.error('没有数据，请上传配送中心数据');
                    var div1="<div type='text' style='padding-top:18%' class=' text-center '>"+d.message+"</div>";
                    document.getElementById('network-map2-${uniqueId}').innerHTML=div1;
                }
            }
        });
    }

</script>